/*
 * SpringBuildCommand.cpp
 *
 *  Created on: Oct 14, 2008
 *      Author: Ryan
 */

#include "SpringBuildCommand.h"



SpringBuildCommand::SpringBuildCommand( OOInterface::ConstUnitPtr unit, const OOInterface::Point3f& loc, const OOInterface::Direction& facing ): BuildCommand( unit, loc, facing )
{
}

SpringBuildCommand::~SpringBuildCommand()
{
}

::Command* SpringBuildCommand::getCommand() const
{
	::Command* cmd = new ::Command;
	cmd->id = -1 * getUnit()->getID();

	// X and Y are multiplied by 8 to convert to true Spring Coordinates
	cmd->params.push_back( getLocation().getX() * 8 );
	cmd->params.push_back( getLocation().getY() );
	cmd->params.push_back( getLocation().getZ() * 8 );

	return cmd;
}
